////饼图
//
//var dataIDC=[{value:31, name:'IDC接入省份数'},
//            {value:31, name:'CDN加速省份数'},
//            {value:39, name:'云接入省份数'}]
//
//var dataCDN=[{value:535, name:'IDC接入省份数'},
//          {value:610, name:'CDN加速省份数'},
//          {value:734, name:'云接入省份数'}]
//
//
//var dataCloud=[{value:1335, name:'IDC接入省份数'},
//          {value:1310, name:'CDN加速省份数'},
//          {value:1234, name:'云接入省份数'}]
//
//var dataCloudCompany=[{value:1335, name:'IDC接入省份数'},
//          {value:1310, name:'CDN加速省份数'},
//          {value:1234, name:'云接入省份数'},
//						{value:1224, name:'云接入省份数22'}]
//
//
//var pieOption = function(){
//	return {
//		color : ["#93dd6e", "#ffe34e","#00a9e1", "#0046af","#360293","#560081","#af0058", "#ff8700"],
//  title : {
//  	show:false,
//	    text: '某站点用户访问来源',
//	    subtext: '纯属虚构',
//	    x:'center'
//  },
//  tooltip : {
//      trigger: 'item',
//      formatter: "{a} <br/>{b} : {c} ({d}%)"
//  },
//  legend: {
//  	show:true,
////  		top:'top',
////  		right:'5%',
//  		bottom: 10,
//  		textStyle:{
//  			color: 'rgba(255,255,255,0.8)'
//  		},
////      orient: 'vertical',
////      data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
//  },
//  series : [
//      {
//        name: '',
//        type: 'pie',
//        radius : '55%',
//        center: ['43%', '40%'],
////          data: 
//        itemStyle: {
//            normal:{
//                label:{
//                    color:'#fff',
//                }
//            },
//            emphasis: {
//                shadowBlur: 10,
//                shadowOffsetX: 0,
//                shadowColor: 'rgba(0, 0, 0, 0.5)'
//            }
//        }
//      }
//  ]
//	}
//}
//
//function legendData(data){
//	var arr=[];
//	for(var i=0;i<data.length;i++){
//		arr.push(data[i].name)
//	}
//	return arr
//}
//var pieMiddleChart = echarts.init(document.getElementById('pieBoxLeft'))
//var pieRightChart = echarts.init(document.getElementById('pieBoxRight'))
//
//
//function ecData(ecObj,ecData){
//	var pieAll=pieOption();
//	pieAll.series[0].data=ecData;
//	pieAll.legend.data=legendData(ecData);
//	ecObj.setOption(pieAll);
//}
//ecData(pieMiddleChart,dataIDC);
//
//var dataCor=[{value:365, name:'IDC接入企业总数'},
//		    {value:7, name:'CDN接入企业总数'},
//		    {value:8, name:'云接入企业总数'}] 
//
//ecData(pieRightChart,dataCor);
///*function selectChange(ecObj,selectObj,ecData1,ecData2,ecData3,ecData4){
//	var index=0
//	selectObj.change(function(){
//		index=selectObj.val();
//		if(index==0){
//			ecData(ecObj,ecData1);
//		}else if(index==1){
//			ecData(ecObj,ecData2);
//		}else if(index==2){
//			ecData(ecObj,ecData3);
//		}else if(index==3){
//			ecData(ecObj,ecData4);
//		}
//	})
//}*/
//$(".caCheck").change(function(){
//	var index=$(".caCheck").val();
//	if(index==0){
//		var data=[{value:31, name:'IDC接入省份数'},
//		            {value:31, name:'CDN加速省份数'},
//		            {value:39, name:'云接入省份数'}] 
//		ecData(pieMiddleChart,data);
//	}else if(index==1){
//		var data=[{value:22, name:'IDC接入省份数'},
//	            {value:31, name:'CDN加速省份数'},
//	            {value:3, name:'云接入省份数'}] 
//		ecData(pieMiddleChart,data);
//	}else if(index==2){
//		var data=[{value:27, name:'IDC接入省份数'},
//	            {value:31, name:'CDN加速省份数'},
//	            {value:11, name:'云接入省份数'}] 
//		ecData(pieMiddleChart,data);
//	}else if(index==3){
//		var data=[{value:7, name:'IDC接入省份数'},
//	            {value:0, name:'CDN加速省份数'},
//	            {value:0, name:'云接入省份数'}] 
//		ecData(pieMiddleChart,data);
//	}else{
//		var data=[{value:29, name:'IDC接入省份数'},
//	            {value:31, name:'CDN加速省份数'},
//	            {value:11, name:'云接入省份数'}] 
//		ecData(pieMiddleChart,data);
//	}
//})
//
//$(".caCheck2").change(function(){
//	var index=$(".caCheck2").val();
//	if(index==0){
//		var data=[{value:365, name:'IDC接入企业总数'},
//		            {value:7, name:'CDN接入企业总数'},
//		            {value:8, name:'云接入企业总数'}] 
//		ecData(pieRightChart,data);
//	}else if(index==1){
//		var data=[{value:58, name:'IDC接入企业总数'},
//	            {value:5, name:'CDN接入企业总数'},
//	            {value:2, name:'云接入企业总数'}] 
//		ecData(pieRightChart,data);
//	}else if(index==2){
//		var data=[{value:103, name:'IDC接入企业总数'},
//	            {value:10, name:'CDN接入企业总数'},
//	            {value:2, name:'云接入企业总数'}] 
//		ecData(pieRightChart,data);
//	}else if(index==3){
//		var data=[{value:7, name:'IDC接入企业总数'},
//	            {value:0, name:'CDN接入企业总数'},
//	            {value:0, name:'云接入企业总数'}] 
//		ecData(pieRightChart,data);
//	}else{
//		var data=[{value:140, name:'IDC接入省份数'},
//	            {value:9, name:'CDN加速省份数'},
//	            {value:4, name:'云接入省份数'}] 
//		ecData(pieRightChart,data);
//	}
//})
////selectChange(pieMiddleChart,$(".caCheck"),dataIDC,dataCDN,dataCloud)
////selectChange(pieRightChart,$(".caCheck2"),dataIDC,dataCDN,dataCloud,dataCloudCompany)
//
//
//var dataX=['2017-12-01','2017-12-02','2017-12-03','2017-12-04','2017-12-05','2017-12-06','2017-12-07','2017-12-08','2017-12-09','2017-12-10','2017-12-11','2017-12-12']
//var data1=[95200245,95200245,60421559,61828272,14759147,69394384,75409509,67232615,77142553,87002584,76616071,72781645]
//var data2=[115,156,256,346,132,563]	
//var barOption2 = {
//	color:["#c8fd6f","#08e2ca"],
//  tooltip: {
////      trigger: 'axis',
////      axisPointer: {
////          type: 'cross',
////          crossStyle: {
////              color: '#999'
////          }
////      }
//  },
//  toolbox: {
//  	show:false,
//      feature: {
//          dataView: {show: true, readOnly: false},
//          magicType: {show: true, type: ['line', 'bar']},
//          restore: {show: true},
//          saveAsImage: {show: true}
//      }
//  },
//  legend: {
//  	show:false,
//  	textStyle:{
//  		color:'#fff'
//  	},
//      data:['访问量']
//  },
//  grid: {
//      left:80,
//      top: 15,
//      right:10,
//      bottom: 30
//  },
//  xAxis: [
//      {
//        type: 'category',
//        data: dataX,
//        axisPointer: {
//            type: 'shadow'
//        },
//        axisLabel:{
//        	color:'#c0d4da'
//        },
//	        axisLine:{
//	        	show:true,
//	        	lineStyle:{
//	        		color:'#c0d4da'
//	        	}
//	        }
//      }
//  ],
//  yAxis: [
//      {
//        type: 'value',
//        name: '单位',
//        min: 0,
//        max: 100000000,
//       // interval: 50,
//        axisLabel: {
//          color:'#c0d4da'
//        },
//        axisLine:{
//	        	show:true,
//	        	lineStyle:{
//	        		color:'#c0d4da'
//	        	}
//      	},
//      	splitLine:{
//      		lineStyle:{
//	        		color:'#272858'
//	        	}
//      	}
//      }
//  ],
//  series: [
//    {
//      name:'访问量',
//      type:'bar',
//      barWidth:'25%',
//      data:data1
//    }
//  ]
//};
//
//var barOption = function(){
//	return {
//		color:["#c8fd6f","#08e2ca"],
//	    tooltip: {
//	      trigger: 'axis'
////	      axisPointer: {
////	          type: 'cross',
////	          crossStyle: {
////	              color: '#999'
////	          }
////	      }
//	    },
//	    toolbox: {
//	    	show:false,
//	        feature: {
//	            dataView: {show: true, readOnly: false},
//	            magicType: {show: true, type: ['line', 'bar']},
//	            restore: {show: true},
//	            saveAsImage: {show: true}
//	        }
//	    },
//	    legend: {
//	    	show:false,
//	    	textStyle:{
//	    		color:'#fff'
//	    	},
//	        data:['访问量']
//	    },
//	    grid: {
//	        left:40,
//	        top: 15,
//	        right:10,
//	        bottom: 30
//	    },
//	    xAxis: [
//	        {
//	          type: 'category',
//	          data: dataX,
//	          axisPointer: {
//	              type: 'shadow'
//	          },
//	          axisLabel:{
//	          	color:'#c0d4da'
//	          },
//		        axisLine:{
//		        	show:true,
//		        	lineStyle:{
//		        		color:'#c0d4da'
//		        	}
//		        }
//	        }
//	    ],
//	    yAxis: [
//	        {
//	          type: 'value',
//	          name: '单位',
//	          min: 0,
////	        max: 250,
//	          interval: 50,
//	          axisLabel: {
//	            color:'#c0d4da'
//	          },
//	          axisLine:{
//		        	show:true,
//		        	lineStyle:{
//		        		color:'#c0d4da'
//		        	}
//	        	},
//	        	splitLine:{
//	        		lineStyle:{
//		        		color:'#272858'
//		        	}
//	        	}
//	        }
//	    ],
//	    series: [
//	      {
//	        name:'访问量',
//	        type:'bar',
//	        barWidth:'25%',
//	        data:data1
//	      }
//	    ]
//}
//}
//
//var barChart2 = echarts.init(document.getElementById('barBottomBox'))
//barChart2.setOption(barOption2)
//
//function visitData(ecObj,ecData){
//	var barAll=barOption();
//	barAll.series[0].data=ecData;
//	//pieAll.legend.data=legendData(ecData);
//	ecObj.setOption(barAll);
//}
//
//$(".caCheck3").change(function(){
//	var index=$(".caCheck3").val();
//	if(index==0){
//		var data1=[95200245,95200245,60421559,61828272,14759147,69394384,75409509,67232615,77142553,87002584,76616071,72781645]
//		visitData(barChart2,data1);
//	}else if(index==1){
//		var data1=[0,0,0,0,0,0,0,0,0,0,0,0]
//		visitData(barChart2,data1);
//	}else if(index==2){
//		var data1=[0,0,0,0,0,0,0,0,0,0,0,0]
//		visitData(barChart2,data1);
//	}else if(index==3){
//		var data1=[0,0,0,0,0,0,0,0,0,0,0,0]
//		visitData(barChart2,data1);
//	}else{
//		var data1=[0,0,0,0,0,0,0,0,0,0,0,0]
//		visitData(barChart2,data1);
//	}
//})

//地图
var mapData=[
	{name:'福建',value:34517},
	{name:'广东',value:25237},
	{name:'北京',value:21950},
	{name:'四川',value:19090},
	{name:'山东',value:18255},
	{name:'天津',value:10159},
	{name:'上海',value:9332},
	{name:'重庆',value:7845},
	{name:'江苏',value:7672},
	{name:'湖北',value:7146},
	{name:'云南',value:6688},
	{name:'湖南',value:5654},
	{name:'安徽',value:4347},
	{name:'河北',value:4119},
	{name:'广西',value:3908},
	{name:'陕西',value:3607},
	{name:'浙江',value:3450},
	{name:'河南',value:1847},
	{name:'江西',value:1462},
	{name:'辽宁',value:1137},
	{name:'新疆',value:1101},
	{name:'黑龙江',value:909},
	{name:'吉林',value:902},
	{name:'甘肃',value:891},
	{name:'山西',value:381},
	{name:'贵州',value:375},
	{name:'海南',value:356},
	{name:'宁夏',value:154},
	{name:'西藏',value:68},
	{name:'内蒙古',value:62},
	{name:'青海',value:45},
	{name: '台湾',value: 0 },
	{name: '香港',value: 0 },
	{name: '澳门',value: 0 }
]
	
var optionMap = {
	tooltip: {
		trigger: 'item',
		formatter:function(param){
//			console.log(param)
			return '<div>'+param.name+'</div>'+
			       '<div>接入IP数：'+param.value+'</div>';
		}
	},
	visualMap: {
    seriesIndex: 0,
    min: 0,
    max: 30000,
    left: '10%',
    bottom: '15%',
    itemHeight:'100',
    inRange: {
     //color: ['#42a5e1','#076ba6']
	   //color: ['#0ef0e6','#076ba6']
    	color: ['#3AE9F2','#FFBA3F']
    },
//      text: ['高','低'],           // 文本，默认为数值文本
    calculable: true,
    textStyle:{
    	color:'#fff'
    }
//  hoverLink: false
	},
	series: [{
        top:'10%',
		zoom: 1.1,
		type: 'map',
		mapType: 'china',
		roam: true,
		label: {
			normal: {
				show: false,
				textStyle: {
					color: '#fff'
				}
			},
			emphasis: {
				show: false,
				textStyle: {
					color: '#fff'
				}
			}
		},
		itemStyle: {
			normal: {
				show:false,
				borderColor: '#134b99',
				borderWidth: 1,
				areaColor: '#388ec7',
				opacity:0.9
			},
			emphasis: {
				areaColor: '#fce24f',
				borderColor: '#fce24f'
			}
		},
		data:mapData
	},{
//		show:false,
	  name: '选择器',
	  tooltip: {
	  	show:false
	  },
	  roam: false,
	  type: 'map',
	  mapType: 'china',
	  right: 'right',
	  top: '5%',
	  width: 90,
//	  height: 100,
	  roam: true,
//	  selectedMode: 'single',
	  showLegendSymbol:false,
	  selectedMode : 'multiple',
	  itemStyle:{
	  	borderColor: 'rgba(0,206,253,0.7)',
	  	areaColor: 'rgba(0,206,253,1)',
	  },
	  label:{
	  	show:false
	  },
	  emphasis:{
	  	label: {
	  		show:false
	  	},
	  	itemStyle:{
	  		borderColor: 'rgba(0,206,253,0.7)',
	  		areaColor: '#0046af',
	  	}
	  }
	}]
};

var mapChart = echarts.init(document.getElementById('ecMap'))
mapChart.setOption(optionMap)

function getOption(data,max){
	var optionMap = {
			tooltip: {
				trigger: 'item',
				formatter:function(param){
//					console.log(param)
					return '<div>'+param.name+'</div>'+
					       '<div>接入IP数：'+param.value+'</div>';
				}
			},
			visualMap: {
		    seriesIndex: 0,
		    min: 0,
		    max: max,
		    left: '10%',
		    bottom: '15%',
		    itemHeight:'100',
		    inRange: {
		     //color: ['#42a5e1','#076ba6']
			   //color: ['#0ef0e6','#076ba6']
		    	color: ['#3AE9F2','#FFBA3F']
		    },
//		      text: ['高','低'],           // 文本，默认为数值文本
		    calculable: true,
		    textStyle:{
		    	color:'#fff'
		    }
		//  hoverLink: false
			},
			series: [{
		        top:'10%',
				zoom: 1.1,
				type: 'map',
				mapType: 'china',
				roam: true,
				label: {
					normal: {
						show: false,
						textStyle: {
							color: '#fff'
						}
					},
					emphasis: {
						show: false,
						textStyle: {
							color: '#fff'
						}
					}
				},
				itemStyle: {
					normal: {
						show:false,
						borderColor: '#134b99',
						borderWidth: 1,
						areaColor: '#388ec7'
					},
					emphasis: {
						areaColor: '#fce24f',
						borderColor: '#fce24f'
					}
				},
				data:data
			},{
//				show:false,
			  name: '选择器',
			  tooltip: {
			  	show:false
			  },
			  roam: false,
			  type: 'map',
			  mapType: 'china',
			  right: 'right',
			  top: '5%',
			  width: 90,
//			  height: 100,
			  roam: true,
//			  selectedMode: 'single',
			  showLegendSymbol:false,
			  selectedMode : 'multiple',
			  itemStyle:{
			  	borderColor: 'rgba(0,206,253,0.7)',
			  	areaColor: 'rgba(0,206,253,1)',
			  },
			  label:{
			  	show:false
			  },
			  emphasis:{
			  	label: {
			  		show:false
			  	},
			  	itemStyle:{
			  		borderColor: 'rgba(0,206,253,0.7)',
			  		areaColor: '#0046af',
			  	}
			  }
			}]
		};
	return optionMap;
}

//折线图
var dataX=['2017-12-01','2017-12-02','2017-12-03','2017-12-04','2017-12-05','2017-12-06','2017-12-07','2017-12-08','2017-12-09','2017-12-10','2017-12-11','2017-12-12']
var data1=[95200245,95200245,60421559,61828272,14759147,69394384,75409509,67232615,77142553,87002584,76616071,72781645]

var lineOption={
	color:["#c8fd6f","#08e2ca"],
    tooltip: {
//      trigger: 'axis',
//      axisPointer: {
//          type: 'cross',
//          crossStyle: {
//              color: '#999'
//          }
//      }
    },
    toolbox: {
    	show:false,
        feature: {
            dataView: {show: true, readOnly: false},
            magicType: {show: true, type: ['line', 'bar']},
            restore: {show: true},
            saveAsImage: {show: true}
        }
    },
    legend: {
    	show:false,
    	textStyle:{
    		color:'#fff'
    	},
        data:['访问量']
    },
    grid: {
        left:80,
        top: 15,
        right:10,
        bottom: 30
    },
    xAxis: [
        {
          type: 'category',
          data: dataX,
          axisPointer: {
              type: 'shadow'
          },
          axisLabel:{
          	color:'#c0d4da'
          },
	        axisLine:{
	        	show:true,
	        	lineStyle:{
	        		color:'#c0d4da'
	        	}
	        }
        }
    ],
    yAxis: [
        {
          type: 'value',
          name: '单位',
          min: 0,
          max: 100000000,
         // interval: 50,
          axisLabel: {
            color:'#c0d4da'
          },
          axisLine:{
	        	show:true,
	        	lineStyle:{
	        		color:'#c0d4da'
	        	}
        	},
        	splitLine:{
        		lineStyle:{
	        		color:'#272858'
	        	}
        	}
        }
    ],
    series: [
      {
        name:'访问量',
        smooth: true,
        type:'line',
        data:data1
      }
    ]
}
var lineChart = echarts.init(document.getElementById('ecLine'))
lineChart.setOption(lineOption)

var iqiyi_data = [
	{name:'安徽',value:1},
	{name:'北京',value:291},
	{name:'福建',value:272},
	{name:'甘肃',value:27},
	{name:'广东',value:522},
	{name:'广西',value:7},
	{name:'贵州',value:14},
	{name:'海南',value:2},
	{name:'河北',value:1},
	{name:'黑龙江',value:3},
	{name:'湖北',value:15},
	{name:'湖南',value:54},
	{name:'吉林',value:7},
	{name:'江苏',value:35},
	{name:'江西',value:1},
	{name:'辽宁',value:2},
	{name:'山东',value:695},
	{name:'山西',value:7},
	{name:'陕西',value:4},
	{name:'上海',value:25},
	{name:'四川',value:3},
	{name:'天津',value:120},
	{name:'新疆',value:24},
	{name:'云南',value:10},
	{name:'浙江',value:77},
	{name:'重庆',value:126}
];

var qq_data = [
	{name:'安徽',value:12},
	{name:'北京',value:2247},
	{name:'福建',value:4218},
	{name:'甘肃',value:51},
	{name:'广东',value:7996},
	{name:'广西',value:11},
	{name:'贵州',value:38},
	{name:'海南',value:4},
	{name:'河北',value:13},
	{name:'黑龙江',value:9},
	{name:'湖北',value:21},
	{name:'湖南',value:836},
	{name:'吉林',value:154},
	{name:'江苏',value:255},
	{name:'江西',value:4},
	{name:'辽宁',value:15},
	{name:'青海',value:1},
	{name:'山东',value:1699},
	{name:'山西',value:36},
	{name:'陕西',value:4},
	{name:'上海',value:125},
	{name:'四川',value:6},
	{name:'天津',value:3511},
	{name:'西藏',value:1},
	{name:'新疆',value:16},
	{name:'云南',value:179},
	{name:'浙江',value:39},
	{name:'重庆',value:1681}
];

var baidu_data = [
	{name:'安徽',value:99},
	{name:'北京',value:52390},
	{name:'福建',value:20362},
	{name:'甘肃',value:1940},
	{name:'广东',value:16967},
	{name:'广西',value:274},
	{name:'贵州',value:29},
	{name:'海南',value:58},
	{name:'河北',value:104},
	{name:'河南',value:35},
	{name:'黑龙江',value:154},
	{name:'湖北',value:677},
	{name:'湖南',value:3651},
	{name:'吉林',value:2071},
	{name:'江苏',value:760},
	{name:'江西',value:21},
	{name:'辽宁',value:4185},
	{name:'内蒙古',value:10},
	{name:'宁夏',value:18},
	{name:'青海',value:345},
	{name:'山东',value:5433},
	{name:'山西',value:1072},
	{name:'陕西',value:755},
	{name:'上海',value:10912},
	{name:'四川',value:37},
	{name:'天津',value:5509},
	{name:'西藏',value:177},
	{name:'新疆',value:1082},
	{name:'云南',value:1086},
	{name:'浙江',value:5729},
	{name:'重庆',value:9417}
];

var _12306_data=[
	{name:'安徽',value:1},
	{name:'北京',value:105},
	{name:'福建',value:146},
	{name:'甘肃',value:26},
	{name:'广东',value:97},
	{name:'广西',value:2},
	{name:'贵州',value:1},
	{name:'海南',value:2},
	{name:'湖北',value:3},
	{name:'湖南',value:101},
	{name:'吉林',value:85},
	{name:'江苏',value:17},
	{name:'辽宁',value:2},
	{name:'山东',value:254},
	{name:'陕西',value:2},
	{name:'上海',value:6},
	{name:'天津',value:76},
	{name:'新疆',value:2},
	{name:'云南',value:13},
	{name:'浙江',value:3},
	{name:'重庆',value:168}
];

var xunlei_data = [
	{name:'安徽',value:1},
	{name:'北京',value:76},
	{name:'福建',value:104},
	{name:'甘肃',value:1},
	{name:'广东',value:58},
	{name:'广西',value:4},
	{name:'贵州',value:19},
	{name:'海南',value:2},
	{name:'河南',value:1},
	{name:'湖北',value:19},
	{name:'湖南',value:13},
	{name:'吉林',value:5},
	{name:'江苏',value:21},
	{name:'江西',value:1},
	{name:'辽宁',value:3},
	{name:'山东',value:476},
	{name:'山西',value:7},
	{name:'陕西',value:4},
	{name:'上海',value:2},
	{name:'四川',value:4},
	{name:'天津',value:37},
	{name:'云南',value:4},
	{name:'浙江',value:1},
	{name:'重庆',value:14}
];

var _163_data = [
	{name:'安徽',value:2},
	{name:'北京',value:291},
	{name:'福建',value:329},
	{name:'甘肃',value:24},
	{name:'广东',value:555},
	{name:'广西',value:17},
	{name:'贵州',value:11},
	{name:'海南',value:4},
	{name:'黑龙江',value:5},
	{name:'湖北',value:13},
	{name:'湖南',value:80},
	{name:'吉林',value:36},
	{name:'江苏',value:99},
	{name:'江西',value:2},
	{name:'辽宁',value:3},
	{name:'青海',value:1},
	{name:'山东',value:289},
	{name:'山西',value:7},
	{name:'陕西',value:7},
	{name:'上海',value:45},
	{name:'四川',value:3},
	{name:'天津',value:141},
	{name:'西藏',value:1},
	{name:'新疆',value:3},
	{name:'云南',value:12},
	{name:'浙江',value:10},
	{name:'重庆',value:131}
];

var _4399_data=[
	{name:'北京',value:56},
	{name:'福建',value:87},
	{name:'甘肃',value:22},
	{name:'广东',value:117},
	{name:'广西',value:4},
	{name:'贵州',value:4},
	{name:'海南',value:3},
	{name:'黑龙江',value:1},
	{name:'湖北',value:12},
	{name:'湖南',value:28},
	{name:'吉林',value:8},
	{name:'江苏',value:19},
	{name:'江西',value:2},
	{name:'辽宁',value:2},
	{name:'山东',value:144},
	{name:'陕西',value:1},
	{name:'上海',value:7},
	{name:'四川',value:1},
	{name:'天津',value:38},
	{name:'西藏',value:1},
	{name:'新疆',value:3},
	{name:'云南',value:12},
	{name:'浙江',value:2},
	{name:'重庆',value:49}
];

var kugou_data = [
	{name:'北京',value:139},
	{name:'福建',value:99},
	{name:'甘肃',value:34},
	{name:'广东',value:73},
	{name:'广西',value:3},
	{name:'贵州',value:10},
	{name:'海南',value:3},
	{name:'湖北',value:2},
	{name:'湖南',value:25},
	{name:'吉林',value:12},
	{name:'江苏',value:30},
	{name:'江西',value:1},
	{name:'辽宁',value:1},
	{name:'青海',value:1},
	{name:'山东',value:607},
	{name:'山西',value:7},
	{name:'陕西',value:1},
	{name:'上海',value:4},
	{name:'四川',value:2},
	{name:'天津',value:4},
	{name:'新疆',value:13},
	{name:'云南',value:12},
	{name:'重庆',value:50}
];

var itunes_data = [
	{name:'安徽',value:3},
	{name:'北京',value:11},
	{name:'福建',value:2},
	{name:'甘肃',value:4},
	{name:'广东',value:19},
	{name:'广西',value:17},
	{name:'贵州',value:3},
	{name:'河北',value:1},
	{name:'黑龙江',value:17},
	{name:'湖北',value:25},
	{name:'湖南',value:2},
	{name:'江苏',value:4},
	{name:'江西',value:5},
	{name:'辽宁',value:12},
	{name:'山东',value:21},
	{name:'陕西',value:3},
	{name:'上海',value:10},
	{name:'四川',value:57},
	{name:'天津',value:3},
	{name:'新疆',value:5},
	{name:'云南',value:6},
	{name:'浙江',value:4},
	{name:'重庆',value:2}
];

var vivo_data=[
	{name:'北京',value:7},
	{name:'福建',value:18},
	{name:'甘肃',value:3},
	{name:'广东',value:8},
	{name:'湖南',value:12},
	{name:'吉林',value:13},
	{name:'江苏',value:1},
	{name:'山东',value:19},
	{name:'上海',value:1},
	{name:'云南',value:9},
	{name:'重庆',value:7}
];

var r1_iqiyi = [['爱奇艺','京ICP备11032965号-1','91110108660527705X','北京爱奇艺科技有限公司']];
var r1_qq = [['腾讯','粤B2-20090059-5','91440300708461136T','深圳市腾讯计算机系统有限公司']];
var r1_baidu = [['百度','京ICP证030173号-1','91110000802100433B','北京百度网讯科技有限公司 ']];
var r1_12306 = [['铁路客户服务中心','京ICP备15003716号-3','91100000000013477B','中国铁路总公司']];
var r1_xunlei = [['迅雷','粤B2-20050219-1','91440300746612636Q','深圳市迅雷网络技术有限公司']];
var r1_163 = [['网易','粤B2-20090191-18','91440101618514927N','广州网易计算机系统有限公司']];
var r1_4399 = [['4399小游戏','闽B2-20040099-1','9135020073786628XK','四三九九网络股份有限公司']];
var r1_kugou = [['酷狗','粤ICP备09017694号-2','91440115783790925T','广州酷狗计算机科技有限公司']];
var r1_itunes = [['','','','']];
var r1_vivo = [['vivo官网','粤ICP备17035209号-2','91441900557262083U','维沃移动通信有限公司']];
ranklistRight1Data(r1_iqiyi);
function ranklistRight1Data(datas){
	var ranklistRight1 = $('#ranklistRight1');
	ranklistRight1.empty();
	var str = "<table class='tab_content'>";
	for(var i = 0 ; i < datas.length ; i++){
		str +="<tr><td>网站名称</td><td title='"+datas[i][0]+"'>"+datas[i][0]+"</td></tr>"+
    	"<tr><td>备案号</td><td title='"+datas[i][1]+"'>"+datas[i][1]+"</td></tr>"+
    	"<tr><td>统一社会信用代码</td><td title='"+datas[i][2]+"'>"+datas[i][2]+"</td></tr>"+
    	"<tr><td>主办单位</td><td title='"+datas[i][3]+"'>"+datas[i][3]+"</td></tr>";
	}
	str +="</table>";
	
	ranklistRight1.append(str);
}
$(".siteChange").change(function(){
	var n = $(this).val();
	//$(".tab_heard").hide();
	var data_right2 = null;
	var optionMap = null;
	if(n == 0){//iqiyi.com
		optionMap = getOption(iqiyi_data,695);
		ranklistRight1Data(r1_iqiyi);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',26],
			['接入企业总数',84],
			['接入机房总数',154],
			['接入IP总数  ',2758],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',6],
			['接入子网总数',52],
			['接入节点总数',1264]
			['云计算    ',''],
			['接入省总数  ',2],
			['接入企业总数',1],
			['接入云IP总数',3]
		]
	}else if(n == 1){//qq.com
		optionMap = getOption(qq_data,7996);
		ranklistRight1Data(r1_qq);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',28],
			['接入企业总数',119],
			['接入机房总数',286],
			['接入IP总数  ',28182],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',9],
			['接入子网总数',56],
			['接入节点总数',1339],
			['云计算    ',''],
			['接入省总数  ',0],
			['接入企业总数',0],
			['接入云IP总数',0]
		]
	}else if(n == 2){//baidu.com
		optionMap = getOption(baidu_data,52390);
		ranklistRight1Data(r1_baidu);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',31],
			['接入企业总数',304],
			['接入机房总数',764],
			['接入IP总数  ',189368],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',8],
			['接入子网总数',57],
			['接入节点总数',1309],
			['云计算    ',''],
			['接入省总数  ',13],
			['接入企业总数',3],
			['接入云IP总数',148]
		]
		
	}else if(n == 3){//12306.cn
		optionMap = getOption(_12306_data,254);
		ranklistRight1Data(r1_12306);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',21],
			['接入企业总数',45],
			['接入机房总数',84],
			['接入IP总数  ',1696],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',4],
			['接入子网总数',32],
			['接入节点总数',1039],
			['云计算    ',''],
			['接入省总数  ',31],
			['接入企业总数',2],
			['接入云IP总数',862]
		]
	}else if(n == 4){//xunlei.com
		optionMap = getOption(xunlei_data,104);
		ranklistRight1Data(r1_xunlei);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',24],
			['接入企业总数',66],
			['接入机房总数',104],
			['接入IP总数  ',948],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',5],
			['接入子网总数',51],
			['接入节点总数',1232],
			['云计算    ',''],
			['接入省总数  ',1],
			['接入企业总数',1],
			['接入云IP总数',1]
		]
	}else if(n == 5){//163.com
		optionMap = getOption(_163_data,329);
		ranklistRight1Data(r1_163);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',27],
			['接入企业总数',89],
			['接入机房总数',179],
			['接入IP总数  ',2476],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',10],
			['接入子网总数',59],
			['接入节点总数',1341],
			['云计算    ',''],
			['接入省总数  ',2],
			['接入企业总数',1],
			['接入云IP总数',2]
		]
	}else if(n == 6){//4399.com
		optionMap = getOption(_4399_data,144);
		ranklistRight1Data(r1_4399);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',24],
			['接入企业总数',49],
			['接入机房总数',108],
			['接入IP总数  ',772],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',4],
			['接入子网总数',50],
			['接入节点总数',1218],
			['云计算    ',''],
			['接入省总数  ',0],
			['接入企业总数',0],
			['接入云IP总数',0]
		]
	}else if(n == 7){//kugou.com
		optionMap = getOption(kugou_data,139);
		ranklistRight1Data(r1_kugou);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',23],
			['接入企业总数',56],
			['接入机房总数',92],
			['接入IP总数  ',1312],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',7],
			['接入子网总数',53],
			['接入节点总数',1280],
			['云计算    ',''],
			['接入省总数  ',0],
			['接入企业总数',1],
			['接入云IP总数',1]
		]
	}else if(n == 8){//itunes.com
		optionMap = getOption(itunes_data,60);
		ranklistRight1Data(r1_itunes);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',23],
			['接入企业总数',41],
			['接入机房总数',92],
			['接入IP总数  ',252],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',1],
			['接入子网总数',20],
			['接入节点总数',180],
			['云计算    ',''],
			['接入省总数  ',0],
			['接入企业总数',0],
			['接入云IP总数',0]
		]
	}else if(n == 9){//vivo.com
		optionMap = getOption(vivo_data,19);
		ranklistRight1Data(r1_vivo);
		data_right2 = [
			['IDC       ',''],
			['接入省份总数',11],
			['接入企业总数',14],
			['接入机房总数',22],
			['接入IP总数  ',123],
			['CDN       ',''],
			['加速省总数 ',31],
			['接入企业总数',1],
			['接入子网总数',12],
			['接入节点总数',642],
			['云计算    ',''],
			['接入省总数  ',0],
			['接入企业总数',0],
			['接入云IP总数',0]
		]
	}
	mapChart.setOption(optionMap);
	ranklistLeftData(data_right2)
});
var data_iqiyi= [
	['IDC       ',''],
	['接入省份总数',26],
	['接入企业总数',84],
	['接入机房总数',154],
	['接入IP总数  ',2758],
	['CDN       ',''],
	['加速省总数 ',31],
	['接入企业总数',6],
	['接入子网总数',52],
	['接入节点总数',1264],
	['云计算    ',''],
	['接入省总数  ',2],
	['接入企业总数',1],
	['接入云IP总数',3]
];

ranklistLeftData(data_iqiyi);
function ranklistLeftData(datas){
	var ranklistRight2 = $('#ranklistRight2');
	ranklistRight2.empty();
	
	var str = "<table border='' cellspacing='' cellpadding='' class='tab_content'>";
	for(var i = 0 ; i < datas.length ; i++){
		str +="<tr>"+
    	"<td>"+datas[i][0]+"</td>"+
    	"<td>"+datas[i][1]+"</td>"+
    	"</tr>"
	}
	str +="</table>";
	ranklistRight2.append(str);
}

window.addEventListener("resize", function () {
    /*pieMiddleChart.resize();
    pieRightChart.resize();
    barChart2.resize();*/
   mapChart.resize()
   lineChart.resize()
});